import dictionary from "@/store/modules/dictionary";
import {
  isEmpty
} from "rxjs/operators";

const getters = {
  sidebar: state => state.app.sidebar,
  language: state => state.app.language,
  visitedViews: state => state.tagsView.visitedViews,
  cachedViews: state => state.tagsView.cachedViews,
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.user.name,
  companyName: state => state.user.companyName,
  user: state => state.user,
  introduction: state => state.user.introduction,
  status: state => state.user.status,
  roles: state => state.user.roles,
  setting: state => state.user.setting,
  permission_routers: state => state.permission.routers,
  addRouters: state => state.permission.addRouters,
  errorLogs: state => state.errorLog.logs,
  area: state => state.address.area,
  reminds: state => state.reminds.reminds,
  buttons: state => state.user.buttons,
  stores: state => state.user.stores,
  allStores:state => state.others.allStores,
  allCarList:state => state.others.allCarList,
  activeRouterName:state => state.tagsView.activeRouteName,
  entryStore:state => state.user.entryStore,//入职门店
  dialogParam:state => state.others.dialog,//公共审核弹框
  // 登录人门店数组
  // getStores: (state,getters) => {
  //   if (getters.storesCalue) {
  //     getters.stores.filter(item => {
  //       if (item.id == getters.storesCalue) return item;
  //     })
  //   } else {
  //     return getters.stores;
  //   }
  // },
  //门店选中值
  storesCalue: state => state.user.storesCalue,
  // 获取字典缓存
  dictionary: state => state.dictionary.dictionary,
  //获取用户的信息
  userInfo:state => state.user.userInfo

}

export default getters
